using System;
using Dynamicweb;

namespace dwblogengine2012.CustomModules.BlogEngine2012
{
    public partial class BlogEngine2012_Edit : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Properties properties = Dynamicweb.Properties.LoadProperties();

            properties.SetDefaultValue("DisplayMode", string.Empty);
            properties.SetDefaultValue("TemplateFilename", string.Empty);
            properties.SetDefaultValue("TemplateFilename_rss", string.Empty);
            properties.SetDefaultValue("PostListLimit", "10");
            properties.SetDefaultValue("PostListMaxNumberOfParagraphs", "1");
            properties.SetDefaultValue("DefaultAuthorName", string.Empty);
            properties.SetDefaultValue("DefaultAuthorEmail", string.Empty);
            properties.SetDefaultValue("BlogTitle", string.Empty);
            properties.SetDefaultValue("BlogDescription", string.Empty);
            properties.SetDefaultValue("FeedTtl", "60");

            DisplayMode.Items.Add(new System.Web.UI.WebControls.ListItem("Blog posts", string.Empty));
            DisplayMode.Items.Add(new System.Web.UI.WebControls.ListItem("Tags", "tags"));
            DisplayMode.Value = properties["DisplayMode"];
            TemplateFilename.Value = properties["TemplateFilename"];
            TemplateFilename_rss.Value = properties["TemplateFilename_rss"];
            PostListLimit.Value = properties["PostListLimit"];
            PostListMaxNumberOfParagraphs.Value = properties["PostListMaxNumberOfParagraphs"];
            DefaultAuthorName.Value = properties["DefaultAuthorName"];
            DefaultAuthorEmail.Value = properties["DefaultAuthorEmail"];
            BlogTitle.Value = properties["BlogTitle"];
            BlogDescription.Value = properties["BlogDescription"];
            FeedTtl.Value = properties["FeedTtl"];
        }
    }
}
